package 泛型边界;

import java.util.ArrayList;

/**
 * @author Administrator
 * @ClassName Test
 * @TIME 星期二 2020/12/29
 */
public class Test {
    public static void main(String[] args) {
        //泛型上界
        ArrayList<? extends Animal> top = new ArrayList<>();
        ArrayList<? extends Animal> top2 = new ArrayList<>();
        System.out.println(top.add(null));
        System.out.println(top2.add(null));
        //泛型下界

    }
}
class Animal{

}
